<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <form onsubmit="return false">
        <button type="botton" onclick="query()">查询</button>
    </form>
    <script>
        function query() {
            fetch("http://127.0.0.1:3055/users/query", {
                credentials: 'include',
                headers: {
                    "Content-Type": "application/json"
                }
            })
                .then(function (d) {
                    return d.json();
                })
                .then(function (d) {
                    console.info(d);
                    if(d. succ){
                        console.log(d.data);
                    }
                    else{
                        alert(d.message);
                    }
                });
        }

    </script>
</body>
</html>